Stefan Kangas [Fri, 8 Jul 2022 12:46:20 +0000 (14:46 +0200)]
Delete obsolete variable buffer-substring-filters
* lisp/simple.el (buffer-substring-filters): Delete variable obsolete
since 24.1.
(buffer-substring--filter): Adjust for deleted variable.
* doc/lispref/text.texi (Buffer Contents): Adjust documentation
for deleted variable.
Eli Zaretskii [Sat, 9 Jul 2022 09:45:21 +0000 (12:45 +0300)]
; Rename 'ffap--accept-or-reject-p'
* lisp/ffap.el (ffap-accept-or-reject-p): Renamed from
'ffap--accept-or-reject-p'; all users changed. Doc fix.
Po Lu [Sat, 9 Jul 2022 08:18:35 +0000 (16:18 +0800)]
Improve drag-and-drop emulation time handling
* src/xselect.c (x_handle_selection_request): Use
display-specific pending DND time.
(x_set_pending_dnd_time): Delete function.
* src/xterm.c (x_dnd_do_unsupported_drop, handle_one_xevent):
Set dpyinfo->pending_dnd_time instead.
* src/xterm.h (struct x_display_info): New field
`pending_dnd_time'. Make handling pending drops
display-specific to avoid interference when there are multiple
displays.
Po Lu [Sat, 9 Jul 2022 04:50:06 +0000 (04:50 +0000)]
Fix race conditions handling selection clear events on Haiku
* src/haiku_select.cc (be_handle_clipboard_changed_message):
Include current clipboard count.
(be_selection_outdated_p): New function.
* src/haikuselect.c (haiku_handle_selection_clear): Ignore
outdated events.
(haiku_selection_disowned): New argument `count'. Include it in
the timestamp field of the selection clear event.
* src/haikuselect.h: Update prototypes.
* src/systime.h: Define `Time' to an appropriate value on Haiku.
Stefan Kangas [Sat, 9 Jul 2022 04:30:38 +0000 (06:30 +0200)]
Merge from origin/emacs-28
3442de2edd Doc fix; don't mention obsolete variable
c4e251103b ; * lisp/textmodes/rst.el: Update URLs.
Po Lu [Sat, 9 Jul 2022 01:16:05 +0000 (01:16 +0000)]
Fix redisplay after running selection hook on Haiku
* src/haikuselect.c (haiku_handle_selection_clear): Call
redisplay_preserve_echo_area.
Po Lu [Sat, 9 Jul 2022 01:07:07 +0000 (09:07 +0800)]
Add new minor mode to deactivate the region once PRIMARY is lost
* doc/emacs/killing.texi (Primary Selection): Document new minor
mode `lost-selection-mode'.
* etc/NEWS: Announce new minor mode.
* lisp/select.el (lost-selection-function): New function.
(lost-selection-mode): New global minor mode.
Sean Whitton [Sat, 9 Jul 2022 00:28:51 +0000 (17:28 -0700)]
; * message.el (message-auto-save-directory): Clarify docstring.
Po Lu [Sat, 9 Jul 2022 00:05:30 +0000 (08:05 +0800)]
Speed up querying for window manager support
* src/xterm.c (handle_one_xevent): Clear net_supported_window if
it is destroyed.
(x_get_wm_check_window): New function.
(x_wm_supports_1): First try net_supported_window. If it still
exists, don't ask for _NET_SUPPORTING_WM_CHECK.
Alan Mackenzie [Fri, 8 Jul 2022 20:19:03 +0000 (20:19 +0000)]
Remove now unused parameter TRACK from do_switch_frame.
* src/lisp.h (extern do_swith_frame declaration)
* src/frame.c (do_switch_frame): Remove parameter TRACK and its comment.
* src/frame.c (Fselect_frame, Fhandle_switch_frame, delete_frame)
* src/keyboard.c (quit_throw_to_read_char)
* src/minibuf.c (read_minibuf_unwind (twice))
* src/window.c (Fset_window_configuration): Remove argument TRACK.
Stefan Kangas [Fri, 8 Jul 2022 19:15:15 +0000 (21:15 +0200)]
Doc fix; don't mention obsolete variable
* src/window.c (Fset_window_hscroll): Doc fix; don't mention obsolete
variable.
Juri Linkov [Fri, 8 Jul 2022 17:58:33 +0000 (20:58 +0300)]
* lisp/isearch.el (isearch-search-fun-in-noncontiguous-region): New function.
(isearch-search-fun-in-text-property): Refactor body to
'search-within-boundaries', then call it (bug#14013).
(search-within-boundaries): New function refactored from
isearch-search-fun-in-text-property.
* test/lisp/isearch-tests.el: Add tests for new search functions.
(isearch--test-search-within-boundaries): New function.
(isearch--test-search-fun-in-text-property)
(isearch--test-search-fun-in-noncontiguous-region): New tests.
Juri Linkov [Fri, 8 Jul 2022 17:47:11 +0000 (20:47 +0300)]
Display the number of invisible matches for isearch-lazy-count (bug#40808)
* lisp/isearch.el (lazy-count-invisible-format): New variable.
(isearch-mode): Set isearch-lazy-count-invisible to nil.
(isearch-lazy-count-format): Use lazy-count-invisible-format and
isearch-lazy-count-invisible.
(isearch-range-invisible): Handle the value 'can-be-opened' of
'search-invisible' and don't open overlays for it, just check
if these overlays can be opened.
(isearch-lazy-count-invisible): New variable.
(isearch-lazy-highlight-new-loop): Set isearch-lazy-count-invisible to nil.
(isearch-lazy-highlight-search): Let-bind search-invisible either to t
for non-nil isearch-lazy-count, or to 'can-be-opened'.
(isearch-lazy-highlight-match): Don't highlight matches intended
to be counted only, not highlighted.
(isearch-lazy-highlight-buffer-update): Separately count invisible
matches by isearch-lazy-count-invisible.
* lisp/info.el (Info-isearch-filter): Check if search-invisible is t.
Stefan Kangas [Fri, 8 Jul 2022 17:00:32 +0000 (19:00 +0200)]
Don't mention moved variable in dired-x manual
* doc/misc/dired-x.texi (Technical Details): Remove mention of
'dired-clean-up-buffers-too'; it has been moved to dired.el.
Stefan Kangas [Fri, 8 Jul 2022 16:50:47 +0000 (18:50 +0200)]
Delete redundant defgroup dired-keys
* lisp/dired-x.el (dired-keys): Delete defgroup.
(dired-bind-vm): Move to :group dired-x.
Stefan Kangas [Fri, 8 Jul 2022 16:31:17 +0000 (18:31 +0200)]
Move dired-do-relsymlink from dired-x.el to dired.el
* lisp/dired-x.el (dired-do-relsymlink, dired-make-relative-symlink)
(dired-do-relsymlink-regexp): Move from here...
* lisp/dired-aux.el (dired-do-relsymlink, dired-make-relative-symlink)
(dired-do-relsymlink-regexp): ...to here. (Bug#21981)
* lisp/dired-x.el: Move keybinding and menu binding from here...
* lisp/dired.el (dired-mode-map, dired-mode-regexp-menu): ...to
here.
* lisp/dired-x.el (dired-keep-marker-relsymlink): Move from here...
* lisp/dired.el (dired-keep-marker-relsymlink): ...to here. Improve
docstring.
* doc/misc/dired-x.texi (Miscellaneous Commands): Move
documentation of above commands from here...
* doc/emacs/dired.texi (Operating on Files)
(Transforming File Names): ...to here.
Juri Linkov [Fri, 8 Jul 2022 17:17:29 +0000 (20:17 +0300)]
* lisp/progmodes/ruby-mode.el (ruby-mode): Set outline-regexp, outline-level.
Suggested by Yilkal Argaw <yilkalargawworkneh@gmail.com>.
Mattias Engdegård [Fri, 8 Jul 2022 16:24:26 +0000 (18:24 +0200)]
Remove unused member of internal struct
* src/fns.c (struct textprop_rec, concat_to_string): Remove `from`.
Stefan Kangas [Fri, 8 Jul 2022 14:13:56 +0000 (16:13 +0200)]
* lisp/dired.el (dired-jump-map): Bind also "j" to dired-jump.
Po Lu [Fri, 8 Jul 2022 13:16:15 +0000 (21:16 +0800)]
Ensure correct position is returned after child frame movement
* src/xterm.c (x_set_offset): Synchronize child frame movement
correctly.
Mattias Engdegård [Fri, 8 Jul 2022 13:09:16 +0000 (15:09 +0200)]
Fix file-name-case-insensitive-p in ffap (bug#56443)
Don't crash if the file name argument to file-name-case-insensitive-p,
after expansion, doesn't have a parent directory. This occurs
when calling ffap on something that looks like an email address.
* src/fileio.c (Ffile_name_case_insensitive_p): Return nil if no file
or parent directory could be found.
* test/src/fileio-tests.el (fileio-tests--identity-expand-handler)
(fileio--file-name-case-insensitive-p): New test.
Stefan Kangas [Fri, 3 Dec 2021 22:17:04 +0000 (23:17 +0100)]
Remove many items obsolete since 24.1
* lisp/allout.el (allout-abbreviate-flattened-numbering)
(allout-mode-deactivate-hook):
* lisp/ansi-color.el (ansi-color-unfontify-region):
* lisp/auth-source.el (auth-source-hide-passwords)
(auth-source-user-or-password)
(auth-source-forget-user-or-password):
* lisp/cedet/data-debug.el (data-debug-map):
* lisp/cedet/semantic/grammar.el (semantic-grammar-syntax-table)
(semantic-grammar-map):
* lisp/chistory.el (command-history-map):
* lisp/comint.el (comint-dynamic-complete)
(comint-dynamic-complete-as-filename)
(comint-dynamic-simple-complete):
* lisp/dired-x.el (read-filename-at-point)
(dired-x-submit-report):
* lisp/dos-fns.el (register-name-alist, make-register)
(register-value, set-register-value, intdos, mode25, mode4350):
* lisp/emacs-lisp/bytecomp.el (byte-compile-disable-print-circle):
* lisp/emacs-lisp/chart.el (chart-map):
* lisp/emacs-lisp/package.el (package-menu-view-commentary):
* lisp/emacs-lock.el (toggle-emacs-lock, emacs-lock-from-exiting):
* lisp/erc/erc.el (erc-complete-word):
* lisp/eshell/em-cmpl.el (eshell-cmpl-suffix-list):
* lisp/eshell/esh-util.el (eshell-for):
* lisp/files.el (inhibit-first-line-modes-regexps)
(inhibit-first-line-modes-suffixes):
* lisp/gnus/gnus-msg.el (gnus-outgoing-message-group)
(gnus-debug-files, gnus-debug-exclude-variables):
* lisp/gnus/gnus-registry.el (gnus-registry-user-format-function-M):
* lisp/gnus/gnus.el (gnus-local-domain, gnus-carpal):
* lisp/gnus/nnimap.el (nnimap-split-rule):
* lisp/iimage.el (turn-on-iimage-mode):
* lisp/image.el (image-extension-data, image-library-alist):
* lisp/mail/emacsbug.el (report-emacs-bug-pretest-address):
* lisp/mail/mail-utils.el (rmail-dont-reply-to):
* lisp/mail/mailalias.el (mail-complete-function)
(mail-completion-at-point-function):
* lisp/mail/rmail.el (rmail-dont-reply-to-names)
(rmail-default-dont-reply-to-names):
* lisp/mail/sendmail.el (mail-mailer-swallows-blank-line)
(mail-sent-via):
* lisp/menu-bar.el (menu-bar-kill-ring-save):
* lisp/minibuffer.el (completion-annotate-function)
(minibuffer-local-filename-must-match-map):
* lisp/msb.el (msb-after-load-hooks):
* lisp/obsolete/eieio-compat.el (eieio-defmethod)
(eieio-defgeneric):
* lisp/obsolete/info-edit.el (Info-edit-map):
* lisp/obsolete/starttls.el (starttls-any-program-available):
* lisp/progmodes/cfengine.el (cfengine-mode-abbrevs):
* lisp/progmodes/cwarn.el (turn-on-cwarn-mode):
* lisp/progmodes/make-mode.el (makefile-complete):
* lisp/progmodes/meta-mode.el (meta-complete-symbol)
(meta-mode-map):
* lisp/progmodes/pascal.el (pascal-toggle-completions)
(pascal-last-completions, pascal-show-completions):
* lisp/progmodes/prolog.el (prolog-char-quote-workaround):
* lisp/progmodes/which-func.el (which-func-mode): [FUNCTION]
* lisp/simple.el (count-lines-region, minibuffer-completing-symbol):
* lisp/speedbar.el (speedbar-syntax-table, speedbar-key-map):
* lisp/strokes.el (strokes-report-bug):
* lisp/subr.el (condition-case-no-debug):
* lisp/term/ns-win.el (ns-alternatives-map)
(ns-store-cut-buffer-internal):
* lisp/term/w32-win.el (w32-default-color-map):
* lisp/term/x-win.el (x-cut-buffer-or-selection-value):
* lisp/textmodes/bibtex.el (bibtex-complete)
(bibtex-entry-field-alist):
* lisp/textmodes/reftex-index.el (reftex-index-map)
(reftex-index-phrases-map):
* lisp/textmodes/reftex-sel.el (reftex-select-label-map)
(reftex-select-bib-map):
* lisp/textmodes/reftex-toc.el (reftex-toc-map):
* lisp/textmodes/rst.el (rst-block-face, rst-external-face)
(rst-definition-face, rst-directive-face, rst-comment-face)
(rst-emphasis1-face, rst-emphasis2-face, rst-literal-face)
(rst-reference-face):
* lisp/vc/vc-hooks.el (vc-toggle-read-only):
* lisp/view.el (view-return-to-alist)
(view-return-to-alist-update): Remove many functions and variables
obsolete since 24.1.
* lisp/textmodes/bibtex.el (bibtex-entry-alist): Don't use above
removed variable 'bibtex-entry-field-alist'.
* lisp/cedet/data-debug.el (data-debug-edebug-expr)
(data-debug-eval-expression):
* lisp/emacs-lisp/trace.el (trace--read-args):
* lisp/files-x.el (read-file-local-variable-value):
* lisp/simple.el (read--expression): Don't use above removed variable
'minibuffer-completing-symbol'.
* lisp/textmodes/rst.el (rst-font-lock-keywords): Don't use above
removed variables.
* src/w32fns.c (Fw32_default_color_map): Delete obsolete function.
(syms_of_w32fns): Delete defsubr for above defun.
* src/keyboard.c (syms_of_keyboard) <Vdeferred_action_list>
<Vdeferred_action_function>: Delete DEFVARs.
<Qdeferred_action_function>: Delete DEFSYM.
(syms_of_keyboard_for_pdumper): Adjust for above change.
(command_loop_1): Don't run deferred-action-function hook.
* lisp/subr.el (deferred-action-list, deferred-action-function):
Delete obsoletion statements.
* lisp/emacs-lisp/ert-x.el (ert-simulate-command): Don't run
'deferred-action-list' hook.
* doc/lispref/hooks.texi (Standard Hooks): Delete
'deferred-action-function'.
* lisp/emacs-lisp/lisp.el (field-complete):
* lisp/eshell/em-cmpl.el (eshell-cmpl-initialize):
* lisp/gnus/gnus-msg.el (gnus-inews-insert-gcc):
* lisp/gnus/nnmail.el (nnmail-fancy-expiry-target):
* lisp/mail/mail-utils.el (mail-dont-reply-to):
* lisp/mail/sendmail.el (sendmail-send-it):
* lisp/mail/smtpmail.el (smtpmail-send-it):
* lisp/minibuffer.el (minibuffer-completion-help):
* lisp/progmodes/python.el: Don't use above removed items.
* lisp/emacs-lisp/eieio-core.el:
* lisp/mail/mailalias.el (mail-complete-alist): Doc fixes; don't refer
to above removed items.
; * etc/NEWS: List removed items.
Stefan Kangas [Fri, 8 Jul 2022 11:07:39 +0000 (13:07 +0200)]
Put safe-local-variable property on auto-insert
* lisp/autoinsert.el (auto-insert): Put safe-local-variable
property to allow disabling auto-inserting without a warning.
Stefan Kangas [Fri, 8 Jul 2022 10:04:17 +0000 (12:04 +0200)]
Stop ffap-machine-at-point from pinging random hosts
Having this on by default is highly problematic from a security and
privacy standpoint, as it risks having outgoing traffic that could
potentially reveal sensitive data (passwords, names, etc.).
It also seems to be causing issues for users, see e.g.
https://github.com/emacs-helm/helm/issues/648
* lisp/ffap.el (ffap-machine-p-known): Change default to 'accept'.
Stefan Kangas [Fri, 8 Jul 2022 09:30:32 +0000 (11:30 +0200)]
Add :safe property to ffap-machine-p-* variables
* lisp/ffap.el (ffap--accept-or-reject-p): New predicate defun.
(ffap-machine-p-local, ffap-machine-p-known)
(ffap-machine-p-unknown): Add :safe property using above new
predicate.
Stefan Kangas [Fri, 8 Jul 2022 09:02:17 +0000 (11:02 +0200)]
Add tests for mail-extr.el
* test/lisp/mail/mail-extr-tests.el: New file.
Stefan Kangas [Fri, 8 Jul 2022 08:35:31 +0000 (10:35 +0200)]
; * lisp/textmodes/rst.el: Update URLs.
Stefan Kangas [Fri, 8 Jul 2022 08:26:35 +0000 (10:26 +0200)]
Avoid obsolete initial-input argument in net-utils.el
* lisp/net/net-utils.el (ping, nslookup-host, dns-lookup-host)
(run-dig, ftp, smbclient, smbclient-list-shares, finger)
(network-connection-to-service): Don't use obsolete initial-input
argument. Use 'format-prompt'. (Bug#56436)
Po Lu [Fri, 8 Jul 2022 07:34:45 +0000 (07:34 +0000)]
Improve behavior of sticky tooltips on Haiku
* src/haiku_support.cc (class EmacsView, MouseMoved): Remove
`tooltip_position'.
(class EmacsMotionSuppressionView): New class.
(BView_set_and_show_sticky_tooltip): Rename to
`be_show_sticky_tooltip'. Add motion suppression view.
* src/haiku_support.h: Update prototypes.
* src/haikufns.c (Fx_show_tip): Update for renamed function.
Po Lu [Fri, 8 Jul 2022 06:55:01 +0000 (06:55 +0000)]
Fix flickering system tooltips on Haiku
* src/haiku_support.cc (class EmacsView, MouseMoved): Restore
sticky status and mouse relative position.
(BView_set_and_show_sticky_tooltip):
* src/haikufns.c (haiku_hide_tip): Fix coding style.
Po Lu [Fri, 8 Jul 2022 05:41:50 +0000 (13:41 +0800)]
Reduce synchronization setting frame alpha
* src/xterm.c (x_set_frame_alpha): Don't synchronize while
setting alpha property, and don't ask for the current value of
the opacity property, which is much more expensive than changing
it.
Stefan Kangas [Fri, 8 Jul 2022 04:31:54 +0000 (06:31 +0200)]
Merge from origin/emacs-28
2ac0ddc4ac ; * lisp/net/net-utils.el: Minor doc fixes.
Po Lu [Fri, 8 Jul 2022 02:44:49 +0000 (10:44 +0800)]
Fix returned action symbol upon "xterm" drop
* src/xterm.c (x_dnd_do_unsupported_drop): Set
x_dnd_action_symbol.
(x_dnd_begin_drag_and_drop): Don't clear it afterwards.
Stefan Kangas [Thu, 7 Jul 2022 21:19:03 +0000 (23:19 +0200)]
* lisp/emacs-lisp/ert.el (Commentary): Refer to the Info manual.
Stefan Kangas [Thu, 7 Jul 2022 15:25:39 +0000 (17:25 +0200)]
Prefer keymap inheritance in shr-image-map
* lisp/net/shr.el (shr-image-map): Replace copy-keymap with
inheritance.
Lars Ingebrigtsen [Thu, 7 Jul 2022 18:21:38 +0000 (20:21 +0200)]
Make imenu--create-keymap more resilient
* lisp/imenu.el (imenu--create-keymap): Ignore nil items in the
alist (bug#56430).
Eli Zaretskii [Thu, 7 Jul 2022 16:34:30 +0000 (19:34 +0300)]
Fix buffer-tests
* test/src/buffer-tests.el (test-restore-buffer-modified-p): Don't
assume turning on auto-save-mode cannot auto-save immediately.
Mattias Engdegård [Wed, 26 Jan 2022 11:30:39 +0000 (12:30 +0100)]
Faster append and vconcat
By separating the code paths for append and vconcat, each becomes
simpler and faster.
* src/fns.c (concat_strings): Rename to...
(concat_to_string): ...this.
(concat): Split into concat_to_list and concat_to_vector.
(concat_to_list, concat_to_vector): New, specialised and
streamlined from earlier combined code.
(concat2, concat3, Fappend, Fconcat, Fvconcat): Adjust calls.
Alan Mackenzie [Thu, 7 Jul 2022 15:38:09 +0000 (15:38 +0000)]
Remove obscure, obsolete code from do_switch_frame
This is relevant for bug #56305, and might solve that bug. The code being
removed went into Emacs between 1992 and 1994, and looks to have been a
workaround for switching frames, before the command 'other-frame' had been
written. Nowadays, that code has harmful effects, causing frames' focus to be
redirected at random, sometimes back to the frame itself.
* src/frame.c (do_switch_frame): Remove 53 lines of code.
Stefan Kangas [Thu, 7 Jul 2022 13:32:48 +0000 (15:32 +0200)]
* lisp/net/dig.el (dig): Provide default.
Stefan Kangas [Thu, 7 Jul 2022 12:54:16 +0000 (14:54 +0200)]
Make net-utils-url at point funs obsolete in favor of ffap
* lisp/net/net-utils.el (net-utils-machine-at-point)
(net-utils-url-at-point): Redefine as obsolete function alias for
'ffap-machine-at-point' and 'ffap-url-at-point'. Update callers.
* lisp/ffap.el (ffap-machine-at-point, ffap-url-at-point): Autoload.
Po Lu [Thu, 7 Jul 2022 13:12:49 +0000 (21:12 +0800)]
Fix selection disowning upon frame deletion on Wayland
* src/pgtkselect.c (pgtk_clear_frame_selections): Manually
disown cleared selections. (bug#56434)
Stefan Kangas [Thu, 7 Jul 2022 12:43:46 +0000 (14:43 +0200)]
* lisp/net/eww.el (eww-browse-url): Add 'browser-kind' property.
Stefan Kangas [Thu, 7 Jul 2022 11:21:07 +0000 (13:21 +0200)]
* lisp/woman.el (woman): Fix comment; don't mention gnudoit.
Stefan Kangas [Thu, 7 Jul 2022 11:18:01 +0000 (13:18 +0200)]
Make two XEmacs related variables obsolete
* lisp/net/browse-url.el (browse-url-gnudoit-program)
(browse-url-gnudoit-args): Make obsolete. The corresponding command
'browse-url-w3-gnudoit' is already obsolete since 25.1.
Po Lu [Thu, 7 Jul 2022 12:16:43 +0000 (20:16 +0800)]
Fix GTK build
* src/xterm.c (x_dnd_begin_drag_and_drop): Update GTK quitting
code for last change too. Reported by Norbert Koch
<viteno@netic.de>.
Po Lu [Thu, 7 Jul 2022 10:36:56 +0000 (18:36 +0800)]
Fix quitting out of selection converters during drag and drop
* src/xterm.c (x_dnd_process_quit): New function.
(x_dnd_begin_drag_and_drop): Use it instead. Also quit if
quit-flag is true immediately after a selection converter is
run.
Stefan Kangas [Thu, 7 Jul 2022 10:05:35 +0000 (12:05 +0200)]
Mark comint modes in net-utils.el as non-interactive
* lisp/net/net-utils.el (net-utils-mode, nslookup-mode, ftp-mode)
(smbclient-mode, network-connection-mode): Mark as non-interactive.
(nslookup-mode-map, ftp-mode-map): Prefer defvar-keymap.
Stefan Kangas [Thu, 7 Jul 2022 10:15:48 +0000 (12:15 +0200)]
; * lisp/net/net-utils.el: Minor doc fixes.
Stefan Kangas [Thu, 7 Jul 2022 09:11:34 +0000 (11:11 +0200)]
Make 'run-dig' command obsolete in favor of 'dig'
* lisp/net/net-utils.el (run-dig): Redefine in terms of `dig' and make
obsolete. (Bug#56432).
(dig-program): Delete duplicate defcustom; it is also in dig.el.
(dig-program-options): Move from here...
* lisp/net/dig.el (dig-program-options): ...to here.
(dig-invoke): Respect 'dig-program-options'.
(dig): Prompt for DNS server when given double prefix argument.
Eli Zaretskii [Thu, 7 Jul 2022 08:56:31 +0000 (11:56 +0300)]
Fix undo of changes in cloned indirect buffers
* lisp/simple.el (primitive-undo): If the visited-modtime of the
indirect buffer's file is bogus, use the modtime of the file
visited by its base buffer.
* src/undo.c (record_first_change): Call
'buffer_visited_file_modtime' with the correct buffer, instead of
always calling 'Fvisited_file_modtime', which returns possibly
bogus values for indirect buffers.
* src/fileio.c (Fset_visited_file_modtime): Signal a meaningful
error for indirect buffers.
(buffer_visited_file_modtime): New function, with implementation
taken from 'Fvisited_file_modtime'.
(Fvisited_file_modtime): Call 'buffer_visited_file_modtime'.
* src/lisp.h: Add prototype for 'buffer_visited_file_modtime'.
(Bug#56397)
Stefan Kangas [Thu, 7 Jul 2022 08:38:45 +0000 (10:38 +0200)]
* lisp/net/dig.el (dig-exit): Mark for 'dig-mode'.
Visuwesh [Wed, 6 Jul 2022 04:33:59 +0000 (10:03 +0530)]
Make the Indian itrans methods more phonetic
The characters ऋ and ॠ are pronunced as ru in languages such as
Marathi, Gujarati, Telugu, etc. so add new translation rules that
reflects this sound. (bug#56414)
* lisp/language/ind-util.el (indian-itrans-v5-table): Add new
translation rules to make the input method more phonetic.
(indian-tml-base-table, indian-tml-base-digits-table): Fix typo.
Eli Zaretskii [Thu, 7 Jul 2022 06:31:49 +0000 (09:31 +0300)]
Merge branch 'master' of git.savannah.gnu.org:/srv/git/emacs
Juri Linkov [Thu, 7 Jul 2022 06:31:02 +0000 (09:31 +0300)]
Don't accumulate trailing newlines on every save of .dir-locals.el
* lisp/files-x.el (modify-dir-local-variable): Insert a newline
only after creating a new file.
(dir-locals-to-string): Remove newline to not add more newlines
on every save.
Eli Zaretskii [Thu, 7 Jul 2022 06:29:51 +0000 (09:29 +0300)]
; Improve documentation of 'set-transient-map' changes
* lisp/subr.el (set-transient-map-timeout, set-transient-map): Doc
fixes.
* etc/NEWS: Improve wording of the 'set-transient-map' entry.
* doc/lispref/keymaps.texi (Controlling Active Maps): Fix wording
and passive tense, and improve indexing. (Bug#21634)
Po Lu [Thu, 7 Jul 2022 05:37:31 +0000 (13:37 +0800)]
Fix `trace-function' default buffer
* lisp/emacs-lisp/trace.el (trace--read-args): Don't use
format-prompt; instead, use DEF arg to read-buffer.
Stefan Kangas [Thu, 7 Jul 2022 04:30:37 +0000 (06:30 +0200)]
; Merge from origin/emacs-28
The following commit was skipped:
f9d01e5047 ; * lisp/emacs-lisp/ert.el: Remove installation instructions.
Sean Whitton [Thu, 7 Jul 2022 03:34:33 +0000 (20:34 -0700)]
gnus-advanced-body: Fix return value
* gnus-logic.el (gnus-advanced-body): Return whether the search
succeeded, not the value of one of the cleanup forms.
Po Lu [Thu, 7 Jul 2022 02:50:49 +0000 (10:50 +0800)]
Fix NS build
* src/keyboard.c (process_special_events): Don't define copy and
moved events on the wrong toolkit.
Po Lu [Thu, 7 Jul 2022 02:48:19 +0000 (02:48 +0000)]
Port `x-lost-selection-functions' to Haiku
* src/haiku_io.c (haiku_len): Add `CLIPBOARD_CHANGED_EVENT'.
* src/haiku_select.cc (be_update_clipboard_count): Set ownership
flags.
(be_handle_clipboard_changed_message):
(be_start_watching_selection): New functions.
* src/haiku_support.cc (class Emacs): Handle
B_CLIPBOARD_CHANGED.
* src/haiku_support.h (enum haiku_event_type): New event
`CLIPBOARD_CHANGED_EVENT'.
(struct haiku_clipboard_changed_event): New struct.
* src/haikuselect.c (haiku_handle_selection_clear)
(haiku_selection_disowned, haiku_start_watching_selections): New
functions.
(syms_of_haikuselect): New defsym and defvar.
* src/haikuselect.h: Update prototypes.
* src/haikuterm.c (haiku_read_socket): Handle selection events.
(haiku_term_init): Start watching selections.
* src/haikuterm.h: Update prototypes.
* src/keyboard.c (kbd_buffer_get_event, process_special_events)
(mark_kboards): Handle SELECTON_CLEAR_EVENTs correctly on Haiku.
Po Lu [Thu, 7 Jul 2022 01:21:22 +0000 (09:21 +0800)]
Avoid excessive synchronization performing "xterm" drops
* src/xterm.c (x_dnd_do_unsupported_drop): Asynchronously catch
errors around XSendEvent.
Stefan Kangas [Thu, 7 Jul 2022 00:09:30 +0000 (02:09 +0200)]
End new .dir-locals.el files with a newline
* lisp/files-x.el (dir-locals-to-string): Add newline at the end of
newly created .dir-locals.el files. This avoids git complaining about
"No newline at end of file".
Stefan Kangas [Wed, 6 Jul 2022 18:53:52 +0000 (20:53 +0200)]
Autoload safe local property for plstore-encrypt-to
* lisp/plstore.el (plstore-encrypt-to): Autoload 'safe-local-variable'
property for improved security.
Stefan Kangas [Wed, 6 Jul 2022 17:56:32 +0000 (19:56 +0200)]
Prefer defcustom :safe to putting 'safe-local-variable'
* lisp/emacs-lisp/lisp-mode.el (lisp-indent-offset)
(lisp-body-indent, emacs-lisp-docstring-fill-column):
* lisp/files.el (version-control):
* lisp/progmodes/modula2.el (m2-indent):
* lisp/progmodes/octave.el (octave-block-offset):
* lisp/progmodes/sh-script.el (sh-basic-offset):
* lisp/progmodes/tcl.el (tcl-indent-level)
(tcl-continued-indent-level):
* lisp/simple.el (fill-prefix):
* lisp/textmodes/fill.el (colon-double-space):
* lisp/textmodes/paragraphs.el (paragraph-start)
(paragraph-separate, sentence-end-double-space)
(sentence-end-without-period, sentence-end-without-space)
(sentence-end, sentence-end-base, page-delimiter)
(paragraph-ignore-fill-prefix):
* lisp/textmodes/tex-mode.el (tex-fontify-script):
* lisp/vc/add-log.el (add-log-dont-create-changelog-file):
* lisp/vc/vc-hooks.el (vc-follow-symlinks): Prefer defcustom :safe to
putting 'safe-local-variable'.
Juri Linkov [Wed, 6 Jul 2022 17:40:48 +0000 (20:40 +0300)]
* lisp/repeat.el (describe-repeat-maps): Handle non-symbol keymap (bug#21634).
Juri Linkov [Wed, 6 Jul 2022 17:39:41 +0000 (20:39 +0300)]
Add new args MESSAGE and TIMEOUT to set-transient-map (bug#21634)
* lisp/subr.el (set-transient-map): Add new args MESSAGE and TIMEOUT.
(set-transient-map-timeout, set-transient-map-timer): New variables.
* lisp/international/emoji.el (emoji-zoom-increase):
* lisp/indent.el (indent-rigidly):
* lisp/face-remap.el (text-scale-adjust, global-text-scale-adjust):
Use the arg MESSAGE of set-transient-map.
* doc/lispref/keymaps.texi (Controlling Active Maps): Mention new args
MESSAGE and TIMEOUT of set-transient-map.
Stefan Kangas [Wed, 6 Jul 2022 17:29:51 +0000 (19:29 +0200)]
Make some additional defcustom types more restrictive
* lisp/desktop.el (desktop-lazy-idle-delay):
* lisp/files.el (dired-kept-versions)
(kept-old-versions, kept-new-versions):
* lisp/filesets.el (filesets-max-submenu-length)
(filesets-max-entry-length, filesets-tree-max-level)
(filesets-query-user-limit):
* lisp/hi-lock.el (hi-lock-file-patterns-range)
(hi-lock-highlight-range):
* lisp/ido.el (ido-max-work-directory-list):
* lisp/image/gravatar.el (gravatar-cache-ttl):
* lisp/imenu.el (imenu-auto-rescan-maxout, imenu-max-items):
* lisp/informat.el (Info-split-threshold):
* lisp/mail/hashcash.el (hashcash-default-payment)
(hashcash-default-accept-payment):
* lisp/mail/mail-hist.el (mail-hist-history-size):
* lisp/mail/smtpmail.el (smtpmail-retries):
* lisp/msb.el (msb-display-most-recently-used):
* lisp/nxml/rng-valid.el (rng-state-cache-distance)
(rng-validate-chunk-size):
* lisp/progmodes/gdb-mi.el (gdb-max-source-window-count):
* lisp/recentf.el (recentf-arrange-by-rules-min-items):
* lisp/simple.el (kill-ring-max, mark-ring-max)
(global-mark-ring-max):
* lisp/tab-line.el (tab-line-tab-name-truncated-max):
* lisp/term.el (term-buffer-maximum-size, term-input-chunk-size):
* lisp/thumbs.el (thumbs-max-image-number)
(thumbs-thumbsdir-max-size, thumbs-relief, thumbs-margin)
(thumbs-image-resizing-step):
* lisp/type-break.el (type-break-interval)
(type-break-good-rest-interval, type-break-query-interval)
(type-break-warning-repeat):
* lisp/vc/compare-w.el (compare-windows-sync-string-size):
* lisp/woman.el (woman-fill-column): Use defcustom :type natnum.
* lisp/emacs-lisp/backtrace.el (backtrace-line-length):
* lisp/doc-view.el (doc-view-conversion-refresh-interval):
Use defcustom :type natnum and allow the nil value.
* lisp/gnus/spam-stat.el (spam-stat-process-directory-age):
Use defcustom :type integer.
Stefan Kangas [Wed, 6 Jul 2022 13:25:56 +0000 (15:25 +0200)]
Fix missing :value with defcustom const :type
* lisp/calendar/calendar.el (calendar-intermonth-header)
(calendar-intermonth-text, calendar-date-style):
* lisp/calendar/diary-lib.el (diary-face-attrs):
* lisp/emacs-lisp/package.el (package-check-signature):
* lisp/erc/erc-dcc.el (erc-dcc-get-default-directory):
* lisp/gnus/gnus-art.el (gnus-auto-select-part):
* lisp/gnus/gnus-cus.el (gnus-agent-parameters):
* lisp/gnus/gnus.el (gnus-user-agent):
* lisp/mail/rmail.el (rmail-retry-ignored-headers):
* lisp/progmodes/sh-script.el (sh-indent-after-continuation):
Fix missing :value with defcustom const :type.
Po Lu [Wed, 6 Jul 2022 12:23:19 +0000 (12:23 +0000)]
Fix infinite looping around Haiku menus
* src/haikumenu.c (haiku_menu_show): Block SIGIO around menu
event loop.
* src/haikuterm.c (haiku_read_socket): Flush tooltip frames
after resize.
Davide Masserut [Wed, 6 Jul 2022 11:45:40 +0000 (13:45 +0200)]
Send region to the subshell specified by the current file interpreter
* sh-script.el (sh-execute-region): Send region to the subshell
specified by the current file interpreter (bug#56406).
Manuel Giraud [Wed, 6 Jul 2022 11:18:09 +0000 (13:18 +0200)]
Remove soft newlines in longlines-mode
* lisp/longlines.el (longlines-mode, longlines-encode-string): Update
from `buffer-substring-filters' to `filter-buffer-substring-function'.
Remove soft newlines in substring (bug#56335).
Stefan Kangas [Wed, 6 Jul 2022 10:31:01 +0000 (12:31 +0200)]
; * lisp/emacs-lisp/ert.el: Remove installation instructions.
(cherry picked from commit
ef218ac936c3ffe219b57e37e684fd8400389c38)
Stefan Kangas [Wed, 6 Jul 2022 10:31:01 +0000 (12:31 +0200)]
; * lisp/emacs-lisp/ert.el: Remove installation instructions.
F. Jason Park [Tue, 5 Jul 2022 10:46:00 +0000 (03:46 -0700)]
* lisp/erc/erc-track.el (erc-track-minor-mode-map): Doc fix.
dickmao [Fri, 1 Jul 2022 15:06:51 +0000 (11:06 -0400)]
Use compatibility macro for ISUPPORT caching in ERC
* lisp/erc/erc-backend.el (erc--with-memoization): Defalias was a
kung-fu I've never seen before. (Bug#56340)
Po Lu [Wed, 6 Jul 2022 08:31:54 +0000 (16:31 +0800)]
Stop synchronizing after sending XEmbed events
* src/xterm.c (xembed_send_message): Don't sync and handle
errors, which is actually why the XSync call in the spec exists.
Martin Rudalics [Wed, 6 Jul 2022 07:25:43 +0000 (09:25 +0200)]
Fix 'fit-frame-to-buffer' (Bug#56102)
* lisp/window.el (fit-frame-to-buffer-sizes): Fix doc-string.
Give calls to 'max' a second argument so they do something
useful. If ONLY equals 'vertically', call
'window-text-pixel-size' with X-LIMIT nil (Bug#56102). For
minimum sizes of the window to fit, use 'window-safe-min-size' by
default.
* doc/lispref/windows.texi (Resizing Windows): Fix descriptions of
'fit-frame-to-buffer' and 'fit-frame-to-buffer-sizes'.
Po Lu [Wed, 6 Jul 2022 06:09:51 +0000 (14:09 +0800)]
Fix the MS-DOS build
* msdos/sedlibmk.inp: Define GL_GNULIB_RAWMEMCHR.
* src/process.c (Fsignal_names): Disable on MS-DOS and use
SIGNUM_BOUND, which is always provided by gnulib.
Po Lu [Wed, 6 Jul 2022 05:43:24 +0000 (13:43 +0800)]
Speed up interning XDS atoms
* src/xselect.c (symbol_to_x_atom, x_atom_to_symbol)
(syms_of_xselect): Handle new atoms.
* src/xterm.c (x_atom_refs):
* src/xterm.h (struct x_display_info): New atoms
`XdndDirectSave0', `XdndActionDirectSave' and `text/plain'.
Paul Eggert [Wed, 6 Jul 2022 04:57:32 +0000 (23:57 -0500)]
Update from Gnulib by running admin/merge-gnulib
* admin/merge-gnulib (AVOIDED_MODULES): Add chmod.
Stefan Kangas [Wed, 6 Jul 2022 04:30:39 +0000 (06:30 +0200)]
Merge from origin/emacs-28
6b5d829d9d Add index entry for "ignore case"
29e1459965 ; * lisp/files.el (remote-file-name-inhibit-cache): Minor ...
Paul Eggert [Wed, 6 Jul 2022 04:25:44 +0000 (23:25 -0500)]
Adjust better to Autoconf quoting style change
* admin/gitmerge.el (gitmerge-emacs-version):
* admin/nt/dist-build/build-zips.sh (ACTUAL_VERSION):
* admin/quick-install-emacs (VERSION):
* lisp/cedet/ede/emacs.el (ede-emacs-version):
Adjust to change in configure.ac’s Autoconf quoting style.
* etc/srecode/ede-autoconf.srt:
* test/lisp/progmodes/autoconf-tests.el:
(autoconf-tests-current-defun-function-define)
(autoconf-tests-current-defun-function-subst):
Use better Autoconf quoting.
* make-dist (version): Simplify.
Po Lu [Wed, 6 Jul 2022 02:42:12 +0000 (10:42 +0800)]
Reduce duplicate code cleaning up DND processes
* src/xterm.c (x_restore_events_after_dnd): New function.
(x_dnd_cleanup_drag_and_drop, x_dnd_begin_drag_and_drop): Use
that instead of manually cleaning up properties and events.
Po Lu [Wed, 6 Jul 2022 01:01:02 +0000 (09:01 +0800)]
Don't select for unnecessary properties during DND
* src/xterm.c (x_dnd_begin_drag_and_drop): Don't select for
property changes when not using toplevels.
Po Lu [Tue, 5 Jul 2022 13:56:50 +0000 (21:56 +0800)]
Fix announcements of XDND mouse rectangles
* lisp/x-dnd.el (x-dnd-handle-xdnd): Use correct meaning of "2",
which isn't well documented.
* src/xterm.c (handle_one_xevent): Likewise. Also fix unpacking
of mouse rects.
Glenn Morris [Tue, 5 Jul 2022 21:50:17 +0000 (14:50 -0700)]
* make-dist: Fix after recent configure.ac quoting changes.
Lars Ingebrigtsen [Tue, 5 Jul 2022 20:42:25 +0000 (22:42 +0200)]
Fix custom-initialize-reset bootstrap error
* lisp/custom.el (custom-initialize-reset): Fix bootstrap problem
by avoiding when-let.
Lars Ingebrigtsen [Tue, 5 Jul 2022 19:06:36 +0000 (21:06 +0200)]
Fix rcirc buffer name collisions
* lisp/net/rcirc.el (rcirc-handler-NICK): Avoid naming collisions
when renaming buffers (bug#45872).
Michael Albinus [Tue, 5 Jul 2022 19:19:51 +0000 (21:19 +0200)]
Mention remote-file-name-inhibit-auto-save-visited in Tramp manual
* doc/misc/tramp.texi (Auto-save File Lock and Backup):
Explain remote-file-name-inhibit-auto-save-visited.
Stefan Kangas [Tue, 5 Jul 2022 17:57:34 +0000 (19:57 +0200)]
Add index entry for "ignore case"
* doc/emacs/glossary.texi (Glossary): Add index entry for "ignore
case" pointing to "Case Folding".
Stefan Kangas [Tue, 5 Jul 2022 17:37:55 +0000 (19:37 +0200)]
Rename new option to remote-file-name-inhibit-auto-save-visited
* lisp/files.el (remote-file-name-inhibit-auto-save-visited):
Rename from 'auto-save-visited-remote-files' and invert logic.
(auto-save-visited-mode): Adjust accordingly. (Bug#41333)
Suggested by Michael Albinus <michael.albinus@gmx.de>.
Lars Ingebrigtsen [Tue, 5 Jul 2022 17:37:52 +0000 (19:37 +0200)]
Regenerate ldefs-boot.el
Lars Ingebrigtsen [Tue, 5 Jul 2022 17:32:37 +0000 (19:32 +0200)]
Give a warning if setopt has been used with an invalid value
* lisp/cus-edit.el (setopt--set): Mark the variable for checking.
* lisp/custom.el (custom-initialize-reset): Give a warning if the
type is wrong (bug#56400).
* lisp/wid-edit.el (widget-convert): Autoload.
Stefan Kangas [Tue, 5 Jul 2022 17:32:15 +0000 (19:32 +0200)]
; * lisp/files.el (remote-file-name-inhibit-cache): Minor doc fix.
Eli Zaretskii [Tue, 5 Jul 2022 16:45:35 +0000 (19:45 +0300)]
; * lisp/emacs-lisp/subr-x.el (string-limit): Clarify doc string.
Stefan Kangas [Tue, 5 Jul 2022 15:54:43 +0000 (17:54 +0200)]
; * etc/NEWS: Clarify entry.
Stefan Kangas [Tue, 5 Jul 2022 15:53:06 +0000 (17:53 +0200)]
Re-fix narrowing problem in tramp-debug-buffer-command-completion-p
* lisp/net/tramp.el (tramp-debug-buffer-command-completion-p):
Respect narrowing also for end of substring. (Bug#56225)
Stefan Kangas [Tue, 5 Jul 2022 14:26:45 +0000 (16:26 +0200)]
Make some defcustom types more restrictive
* lisp/abbrev.el (abbrev-suggest-hint-threshold):
* lisp/bookmark.el (bookmark-bmenu-file-column)
(bookmark-menu-length):
* lisp/buff-menu.el (Buffer-menu-size-width)
(Buffer-menu-mode-width):
* lisp/calendar/calendar.el (calendar-week-start-day)
(calendar-intermonth-spacing, calendar-column-width)
(calendar-day-digit-width):
* lisp/calc/calc.el (calc-undo-length):
* lisp/calendar/timeclock.el (timeclock-workday):
* lisp/comint.el (comint-buffer-maximum-size)
(comint-input-ring-size):
* lisp/doc-view.el (doc-view-resolution, doc-view-image-width):
* lisp/emacs-lisp/bytecomp.el (byte-compile-docstring-max-column):
* lisp/emacs-lisp/comp.el (native-comp-debug)
(native-comp-verbose, native-comp-async-jobs-number):
* lisp/emacs-lisp/package.el (package-name-column-width)
(package-version-column-width, package-status-column-width)
(package-archive-column-width):
* lisp/eshell/esh-mode.el (eshell-buffer-maximum-lines):
* lisp/frame.el (blink-cursor-blinks):
* lisp/info.el (Info-breadcrumbs-depth):
* lisp/jit-lock.el (jit-lock-chunk-size):
* lisp/kmacro.el (kmacro-ring-max):
* lisp/menu-bar.el (yank-menu-length, yank-menu-max-items):
* lisp/midnight.el (clean-buffer-list-delay-general)
(clean-buffer-list-delay-special):
* lisp/net/dictionary.el (dictionary-port)
(dictionary-proxy-port):
* lisp/net/ldap.el (ldap-default-port):
* lisp/net/pop3.el (pop3-port, pop3-stream-length):
* lisp/net/rcirc.el (rcirc-default-port):
* lisp/net/sieve-manage.el (sieve-manage-default-port):
* lisp/play/spook.el (spook-phrase-default-count):
* lisp/play/tetris.el (tetris-buffer-width)
(tetris-buffer-height, tetris-width, tetris-height)
(tetris-top-left-x, tetris-top-left-y):
* lisp/profiler.el (profiler-sampling-interval):
* lisp/progmodes/sql.el (sql-port):
* lisp/recentf.el (recentf-max-menu-items):
* lisp/strokes.el (strokes-grid-resolution):
* lisp/tab-bar.el (tab-bar-tab-name-truncated-max):
* lisp/term/xterm.el (xterm-max-cut-length):
* lisp/time.el (display-time-interval, world-clock-timer-second):
* lisp/url/url-cache.el (url-cache-expire-time):
* lisp/url/url-cookie.el (url-cookie-save-interval):
* lisp/url/url-history.el (url-history-save-interval):
* lisp/url/url-queue.el (url-queue-parallel-processes)
(url-queue-timeout):
* lisp/url/url-vars.el (url-max-password-attempts)
(url-max-redirections):
* lisp/vc/emerge.el (emerge-min-visible-lines):
* lisp/vc/vc.el (vc-log-show-limit):
* lisp/window.el (window-min-height, window-min-width):
* lisp/winner.el (winner-ring-size): Use :type natnum.
* lisp/savehist.el (savehist-file-modes): Fix setting to nil value and
use :type natnum.
Lars Ingebrigtsen [Tue, 5 Jul 2022 16:26:52 +0000 (18:26 +0200)]
Don't hard-code `M-c' in `read-regexp'
* lisp/replace.el (read-regexp-map): New map.
(read-regexp--case-fold, read-regexp-toggle-case-folding)
(read-regexp): Factor out to avoid hard-coding `M-c'.